import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
import './App.css'
import Navbar from './pages/Navbar'
import routes from './routers/router'

function App() {
  return (
    <Router>
      <div className="App">
        <Navbar  />
        <Routes>
          {routes.map((route, index) => (
            <Route 
              key={index} 
              path={route.path} 
              element={<route.component />} 
            />
          ))}
        </Routes>
      </div>
    </Router>
  )
}

export default App
